package 
{	
	import flash.utils.getQualifiedClassName;
	import flash.xml.XMLDocument;
	import flash.xml.XMLNode;
	public function getItemListFromXML( p_list: Array , p_xml: XML, a_model : ARow ):Array
	{
		p_list.shift();
		var result :Array = new Array();
		var node : * = null;
		if ( p_list.length >= 1) {
			for each( var p_node : String in p_list ) {
				if (node == null) {
					node = p_xml[p_node];
				}else{ 
					node = node[p_node];
				}
			}	
		}
		else {
			node = p_xml;
		}
		for ( var item : * in node.children()) {
			var row : ARow = a_model.clone();
				row.fromXML(node.children()[item]);
				result.push(row);
		}
		return result;
	}
}